
	import java.io.File;

	public class DirectAndSize
	{ 
		public DirectAndSize(String path)
	{
			File root = new File(path);
			printDirect(root.getPath(), 0);
	}

	public long printDirect(String path, int level)
	{
		long sizeByt = 0;

		File tmp = new File(path);
		for(int l = 0; l < level; l++)
			System.out.print("\t");
		System.out.println(tmp.getPath());

		File[] files = tmp.listFiles();
		for(int l = 0; l < files.length; l++)
			if(files[l].isDirectory())
				sizeByt += printDirect(files[l].getPath(), level+1);
			else
				sizeByt += files[l].length();

		for(int l = 0; l < level; l++)
				System.out.print("\t");
		System.out.println("Size: " + sizeByt);

		return sizeByt;
	}

	public static void main(String[] args)
	{
		DirectAndSize a = new DirectAndSize("..");
	}
	}
